This script can be saved as a stay-open application and added to your startup items. When run, it will check your current IP address once every 60 seconds and then adjust the dialing settings of JPT accordingly. In this way you could automatically have JPT switch between a home and office location (e.g,, having to dial "9," to get an outside line at work but not while you are home). Adjust the IP addresses accordingly.
If you don't have a static IP address, you could use some other trigger to identify the current location including the actual location setting of the Network preference panel.
You could also adjust the script to run as a background-only application so it would not appear in the Dock and would be completely transparent to you while running. You could then add the script to your startup items in the Account pane of the System Preferences and it would launch whenever you log in. The easiest way to make a script application into a faceless background only (FBO) application is to use "Drop Script Backgrounder" by James Sentman <http://www.sentman.com/backgrounder/>.
*)
property home_ip : "192.168.1.2"
property office_ip : "192.168.1.3"
property home_location_name : "Home"
property office_location_name : "Office"
on run
my check_ip()
end run
on idle
my check_ip()
return 60 --check once every 60 seconds
end idle
on check_ip()
try
set the_interface to 0
repeat
set ip_internal to do shell script ("/sbin/ifconfig en" & the_interface & " | head -3 | grep 'inet ' | cut -d' ' -f 2")
if ip_internal is not in {"inet", ""} then exit repeat